package net.starwifi.duobao.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import net.starwifi.duobao.entity.BaseEntity;
import net.starwifi.duobao.entity.Member;

import java.util.ArrayList;
import java.util.List;

/**
 * 精选DTO
 * Created by Administrator on 2015/9/28.
 */
public class JXDTO extends BaseEntity {


    /** 昵称/应用名称 */
    private String nickname;

    /* 姓名/公司名称 */
    private String name;

    /* 描述*/
    private String description;

    /* logo*/
    private String image;

    /** wap站点 */
    private String url;

    /** 是否上架 */
    private Boolean isMarketable;

    /** 是否列出 */
    private Boolean isList;


    public static List<JXDTO> getList(List<Member> memberList){
        List<JXDTO> dataList=new ArrayList<JXDTO>();
        for(Member member:memberList){
            JXDTO entity=new JXDTO();
            entity.setName(member.getName());
            entity.setDescription(member.getDescription());
            entity.setUrl(member.getUrl());
            entity.setImage(member.getLogo());
            entity.setIsMarketable(member.getIsMarketable());
            entity.setId(member.getId());
            entity.setNickname(member.getNickname());
            dataList.add(entity);
        }
        return dataList;
    }

    @JsonProperty
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @JsonProperty
    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @JsonProperty
    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    @JsonProperty
    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    @JsonProperty
    public Boolean getIsMarketable() {
        return isMarketable;
    }

    public void setIsMarketable(Boolean isMarketable) {
        this.isMarketable = isMarketable;
    }

    @JsonProperty
    public Boolean getIsList() {
        return isList;
    }

    public void setIsList(Boolean isList) {
        this.isList = isList;
    }

    @JsonProperty
    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }
}
